<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>返回某个历法中某年中某月的天数</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="ref.calendar.html">Calendar 函数</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.cal-from-jd.html">cal_from_jd</a></div>
 <div class="up"><a href="ref.calendar.html">Calendar 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.cal-days-in-month" class="refentry"> 
 <div class="refnamediv">
  <h1 class="refname">cal_days_in_month</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.1.0, PHP 5)</p><p class="refpurpose"><span class="refname">cal_days_in_month</span> &mdash; <span class="dc-title">返回某个历法中某年中某月的天数</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.cal-days-in-month-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">int</span> <span class="methodname"><strong>cal_days_in_month</strong></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$calendar</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$month</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$year</code></span>
   )</div>

  <p class="para rdfs-comment">
   该函数返回特定<em><code class="parameter">历法</code></em>中的某<em><code class="parameter">年</code></em>中的某<em><code class="parameter">月</code></em>的天数。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.cal-days-in-month-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">calendar</code></em></dt>

     <dd>

      <p class="para">
       用来计算的某个历法
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">month</code></em></dt>

     <dd>

      <p class="para">
       选定历法中的某月
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">year</code></em></dt>

     <dd>

      <p class="para">
       选定历法中的某年
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.cal-days-in-month-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
  指定历法中选定的某月的天数。
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.cal-days-in-month-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-2177">
    <p><strong>Example #1 <span class="function"><strong>cal_days_in_month()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$num&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">cal_days_in_month</span><span style="color: #007700">(</span><span style="color: #0000BB">CAL_GREGORIAN</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">8</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">2003</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;31<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"There&nbsp;was&nbsp;</span><span style="color: #0000BB">$num</span><span style="color: #DD0000">&nbsp;days&nbsp;in&nbsp;August&nbsp;2003"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="ref.calendar.html">Calendar 函数</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.cal-from-jd.html">cal_from_jd</a></div>
 <div class="up"><a href="ref.calendar.html">Calendar 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
